/* eslint-disable import/no-anonymous-default-export */
import Mock from 'mockjs'

const Random = Mock.Random

export default [
    {
        url: '/getList/task',
        type: 'get',
        response: () => {
            let taskList = []
            for (let i = 0; i < 8; i++) {
                let file = {}
                const { type } = Mock.mock({
                    "type|1": [
                        "P",
                        "L",
                        "C"
                    ]
                })
                file.type = type
                file.name = Random.title(1, 3)
                taskList.push(file)
            }
            return {
                code: 200,
                data: {
                    taskList
                }
            }
        }
    }
]